<?php


namespace App\Services\Result;

use App\Interf\Resultable;
use Monolog\Logger;
use TestingConfig;
use ParamConfig;
use App\Models\LogHelper;


class CustomerQuestionnaireTestingResult extends BaseResult implements Resultable
{
    private $answers;

    private $summaryObj;


    public function __construct($answersStr = null)
    {
        $this->answers = $this->convertAnswer($answersStr);
        $this->summaryObj = $this->configAttrObj(1,'测评结果');
    }

    public function result()
    {
        $attrs = [];
        array_push($attrs, $this->getSummaryAttr());
        $data['attrs'] = $attrs;
        $data['chatparam'] = "";
        //图类型常规图
        $data['chatType'] = "";
        return $data;

    }



    public function getSummaryAttr()
    {
        $note='';
        $extra = '';
        $this->getNote($note);
        $obj = $this->summaryObj;
        $obj = $this->compactAttrObj($obj['attr_id'], $obj['title'], $note, $extra);
        return $obj;
    }




    public function getNote(&$note)
   {
       $img = ParamConfig::getValue("S14.questionnaire.result.img");
       $note .= $img;
    }



}